/*
 * @Author: Aster lipian1004@163.com
 * @Date: 2023-12-18 11:11:17
 * @LastEditors: Aster lipian1004@163.com
 * @LastEditTime: 2023-12-18 11:35:51
 * @FilePath: \wflow-uniapp\src\services\api\process.ts
 * @Description: 审批
 */
import config from '@/utils/config';
import { request } from '@/utils/http';
import { API } from '../model/baseModel';
import { ApproveResultModel } from '../model/approveTask/approveResultModel';
import { SubmitModel } from '../model/approveTask/submitModel';
import { DoneModel } from '../model/approveTask/doneModel';

/**
 * 获取我发起的
 */
export function getUserInitiateList(params: Object) {
  return request.post<API<ApproveResultModel<SubmitModel>>>(config.url.submitList, params);
}

/**
 * 获取我已处理
 */
export function getIdoList(params: Object) {
  return request.get<API<ApproveResultModel<DoneModel>>>(config.url.doneList, { params: params });
}

/**
 * 获取待我处理
 */
export function getUserTodoList(params: Object) {
  return request.post<API<ApproveResultModel<DoneModel>>>(config.url.undoList, params);
}

/**
 * 获取抄送我的
 */
export function getCcMeList(params: Object) {
  return request.get<API<ApproveResultModel<SubmitModel>>>(config.url.ccList, { params: params });
}
